Javascript jQuery 

Javascript errors you should be aware of

Javascript is one of the most popular programming languages in recent days, so we tried to find some most common errors in javascript. After working on many projects, we found some common javascript error based on errors that occurred in different browsers. There are many Javascript errors that occur when you run your code, Below are some error which is browser-centric and some are common in all browsers. 

Google Chrome: 

  • Uncaught TypeError: Cannot read property
    It occurs when you read a property or call a method on an undefined object.
  • TypeError: ‘undefined’ is not a function. 
    It occurs when you call an undefined function.
  • Uncaught RangeError: Maximum call stack. 
    It occurs under a couple of circumstances. calling a function which in turn calls another function and so forth, until you hit the call stack limit.
  • TypeError: Cannot read property ‘length’. 
    This occurs in Chrome because of reading length property for an undefined variable.


Safari:

  • TypeError: ‘undefined’ is not an object. 
    It occurs when you read a property or call a method on an undefined object.
  • TypeError: null is not an object
     It occurs when you read a property or call a method on a null object.


Internet Explorer:

  • TypeError: Object doesn’t support the property.
    This occurs in IE when you call an undefined method.


Other Common Errors:

  • (unknown): Script error. 
    This occurs when an uncaught JavaScripterror crosses domain boundaries in violation of the cross-origin policy.
  • Uncaught TypeError: Cannot set property. 
    When we try to access an undefined variable it always returns undefined and we cannot get or set any property of undefined.
  • ReferenceError: event is not defined. 
    This error is thrown when you try to access a variable that is undefined or is outside the current scope.
  • Refused to get unsafe header “x-parse-job-status-id”:
    To resolve this error, add the access control expose headers in the parse server in order to ‘fix’ this issue.
Also Read:  How to read the file content from javascript

Related posts